<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>任务运行次数统计记录列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/jquery.min.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/easyui.comm.valid.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui.grid.hide.js"></script>
    <script type="text/javascript" src="../../js/easyui/Common.js"></script>
    <script type="text/javascript" src="../../js/easyui/comm.dict.js"></script>
    <script type="text/javascript" src="../../js/easyui/DateUtils.js"></script>
    <script type="text/javascript" src="../common.task.js"></script>
    <link rel="stylesheet" type="text/css" href="../../assets/easyui/easyui1.7.0/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../assets/easyui/easyui1.7.0/themes/icon.css">

    <style type="text/css">
        #fm {
            margin: 0;
            padding: 10px 20px;
        }

        .ftitle {
            font-size: 14px;
            font-weight: bold;
            padding: 5px 0;
            margin-bottom: 10px;
            border-bottom: 1px solid #ccc;
        }

        .fitem {
            margin-bottom: 5px;
        }

        .fitem label {
            display: inline-block;
            width: 60px;
        }

        .input_query {
            width: 80px;
        }

        input, textarea {
            width: 160px;
            border: 1px solid #ccc;
            padding: 2px;
        }
    </style>
</head>

<body>

<div class="easyui-layout" data-options="fit:true">
    <!-- 查询条件  -->
    <div data-options="region:'north', title:'任务运行次数统计记录-条件'"
         style="height: 80px; padding: 5px 10px;display:none;">
        <form id="search-form" class="form-inline" style="float:left">
            <div class="form">
                <div class="input-group">
                    <input name="startTime" id="query_startTime" data-options="prompt:'开始时间'"
                           class="easyui-datetimebox" style="width:160px" formatter="Common.DateFormatter">
                    <input name="endTime" id="query_endTime" data-options="prompt:'结束时间'" class="easyui-datetimebox"
                           style="width:160px" formatter="Common.DateFormatter">
                    <input type="text" id="query_dataMethod" name="dataMethodCode" placeholder="接口方法编码"
                           data-options="prompt:'接口方法id'" class="easyui-validatebox">
                    <input type="text" id="query_timeValue" name="timeValue" placeholder="时间值"
                           data-options="prompt:'时间值'" class="easyui-validatebox">
                    <select id="query_timeType" name="timeType" class="easyui-combobox" style="width:150px;"
                            data-options="prompt:'时间类型'">
                    </select>
                    <a class="easyui-linkbutton" data-options="iconCls:'icon-search'" id="search-btn">查询</a>
                    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload'" id="reset-btn">重置</a>
                </div>
            </div>
        </form>
    </div>

    <!-- 查询结果 center -->
    <div data-options="region:'center', title:'查询结果'">
        <div id="toolbar" style="display:none;">
            <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="sourceCount()">来源统计</a>
        </div>
        <table id="dg" class="easyui-datagrid"
               data-options="onDblClickRow:onDblClick, onClickRow:onClick, onLoadError:loadError, onLoadSuccess:function(){$('.datagrid-btable').find('div.datagrid-cell').css('text-align','left');}"
               toolbar="#toolbar" pagination="true" sortName="maxDate" sortOrder="desc"
               rownumbers="true" fitColumns="true" singleSelect="true" style="display:none;">
            <thead>
            <tr>
                <th align="center" field="id" width="50" sortable="true" hidden="true">id</th>
                <th align="center" field="dataMethodId" width="50" sortable="true" hidden="true">接口方法id</th>
                <th align="center" field="dataMethodCode" width="50" sortable="false" data-options="formatter: function(value,row,index){
                                return row.dataMethod.code;
                            }">接口方法
                </th>
                <th align="center" field="timeType" width="50" sortable="true">时间类型</th>
                <th align="center" field="rowCount" width="50" sortable="true">rowCount</th>
                <th align="center" field="runCountTotal" width="50" sortable="true">总运行次数</th>
                <th align="center" field="maxRunTime" width="50" sortable="true">最长运行时间(ms)</th>
                <th align="center" field="timeValueMin" width="50" sortable="true">最小时间值</th>
                <th align="center" field="timeValueMax" width="50" sortable="true">最大时间值</th>
                <th align="center" field="minDate" width="50" sortable="true" formatter="timestampFormatDateTime">
                    最小时间
                </th>
                <th align="center" field="maxDate" width="50" sortable="true" formatter="timestampFormatDateTime">
                    最大时间
                </th>
                <th align="center" field="errorCountTotal" width="50" sortable="true">总错误次数</th>
                <th align="center" field="minErrorDate" width="50" sortable="true" formatter="timestampFormatDateTime">
                    最小错误时间
                </th>
                <th align="center" field="maxErrorDate" width="50" sortable="true" formatter="timestampFormatDateTime">
                    最大错误时间
                </th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div id="dlg" class="easyui-dialog" style="width:400px;height:500px;padding:5px 10px;display:none;"
     closed="true" buttons="#dlg-buttons">
    <form id="fm" method="post" novalidate>
        <input type="hidden" name="id">
        <div class="fitem">
            <label>接口方法id:</label>
            <input name="dataMethodId" class="easyui-validatebox">
        </div>

        <div class="fitem">
            <label>时间类型:</label>
            <input name="timeType" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>rowCount:</label>
            <input name="rowCount" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>运行次数:</label>
            <input name="runCountTotal" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>最长运行时间(ms):</label>
            <input name="maxRunTime" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>最小时间值:</label>
            <input name="timeValueMin" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>最大时间值:</label>
            <input name="timeValueMax" class="easyui-datetimebox">
        </div>
        <div class="fitem">
            <label>最新运行时间(ms):</label>
            <input name="runTime" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>最小时间:</label>
            <input name="minDate" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>最大时间:</label>
            <input name="maxDate" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>错误总欠数:</label>
            <input name="errorCountTotal" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>最小错误时间:</label>
            <input name="minErrorDate" class="easyui-datetimebox">
        </div>
        <div class="fitem">
            <label>最大错误时间:</label>
            <input name="maxErrorDate" class="easyui-validatebox">
        </div>
    </form>
    <div id="dlg-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="onSave()">Save</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
           onclick="javascript:$('#dlg').dialog('close')">Cancel</a>
    </div>
</div>

<div id="dlgSource" class="easyui-dialog" style="width:900px;height:500px;padding:5px 10px;display:none;"
     closed="true" buttons="#dlgSource-buttons">
    <iframe id="iframeSource" width="100%" height="100%" frameborder="0">
    </iframe>
    <div id="dlgSource-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
           onclick="javascript:$('#dlgSource').dialog('close')">Cancel</a>
    </div>
</div>

<script type="text/javascript" src="taMethodCountStatistic.js"></script>
</body>
</html>